#空函数 使用pass，pass可用来做占位符，代码可正常运行
# def nop():
#     pass
#
# age = input()
# if age > 10:
#     pass

#参数校验，仅允许整数和浮点数
# def my_abs(x):
#     if not isinstance(x,(int,float)):
#         raise TypeError('bad operand type')
#     if x >= 0:
#         return x
#     else:
#         return -x
#
# print(my_abs(10))
# print(my_abs('13'))


#返回多个值
# import math
# def move(x, y, step, angle=0):
#     nx = x + step*math.cos(angle)
#     ny = y + step*math.sin(angle)
#     return nx,ny
#
# (x,y) =  move(100,200,30,math.pi/6)
# r =  move(110,240,20,math.pi/6)
# print((x,y))
# print(r)


# def power(x, n):
#     s = 1
#     while n > 0:
#         n = n - 1
#         s = s * x
#     return s
# print(power(2, 10))


#默认参数
# def enroll(name, gender, age=6, city='BeiJing'):
#     print('name--',name)
#     print('gender--',gender)
#     print('age--',age)
#     print('city--',city)
#
# enroll('wzg','A')